import {baseUrl, getUploadConfig} from '@/config/env';
const uploadConfig=getUploadConfig();

export default () => {
    return {
        index: true,
        submitText: '修改',
        size: 'default',
        labelWidth: 120,
        menuType: 'menu',
        menuAlign: 'center',
        menuPosition: "right",
        searchIndex: 2,
        searchMenuSpan: 6,
        searchIcon: true,
        permissionBtn: {
            addBtn: 'start:act:model:category:add',
            editBtn: 'start:act:model:category:edit',
            viewBtn: 'start:act:model:category:info',
            delBtn: 'start:act:model:category:delete',
        },
        column: [
            {
                label: 'id',
                span: 12,
                prop: 'id',
                align: "left",
                hide: true,
                display: false,
            },
            {
                label: '类别名称',
                prop: 'actCategoryName',
                span: 24,
                rules: [{
                    required: true,
                    trigger: "blur"
                }]
            },
            {
                label: '类别编码',
                span: 24,
                prop: 'actCategoryCode',
                editDetail: true,
                rules: [{
                    required: true,
                    trigger: "blur"
                }]
            },
            {
                label: '图标',
                row: true,
                accept: "image/*",
                prop: 'actCategoryIcon',
                type: "upload",
                limit: 1,
                listType: 'picture-card',
                action: uploadConfig.action,
                propsHttp: uploadConfig.propsHttp,
                rules: [{
                    required: false,
                    trigger: "blur"
                }]
            }, {
                label: '序号',
                span: 24,
                prop: 'actCategorySort',
                type: "number",
                tip: '数字越小越靠前',
            },
        ]
    }
}

